package com.xlf.service.blog.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xlf.common.core.pojo.vo.UserVO;
import com.xlf.pojo.mode.BaseEntity;
import lombok.Data;

/**
 *
 * @TableName t_comment
 */
@TableName(value ="t_comment")
@Data
public class Comment extends BaseEntity implements Serializable {
    /**
     * 评论id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 类型 (1文章 ... )
     */
    private Integer commentType;

    /**
     * 回复的类型的id
     */
    private Long typeId;

    /**
     * 父评论id
     */
    private Long parentId;

    /**
     * 回复的顶级评论id
     */
    private Long replyId;

    /**
     * 评论内容
     */
    private String commentContent;
    /**
     * 是否通过 (0否 1是)
     */
    private Integer isCheck;

    /**
     * 评论的用户id
     */
    private Long fromUid;

    /**
     * 回复谁
     */
    private Long toUid;


    private Integer status;

    @TableField(exist = false)
    private UserVO fromUser;

    @TableField(exist = false)
    private UserVO toUser;



    //免登录方案()————————————————————————
    /**
     * 被评论的用户名
     */
    @Deprecated
    private String toNickName;

    /**
     * 回复人的信息
     */
    @Deprecated
    private String avatar;

    @Deprecated
    private String nickName;

    @Deprecated
    private String email;

    @Deprecated
    private String webSite;

    //————————————————————————————————————————


    @TableField(exist = false)
    private List<Comment> children;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
